﻿using Wicresoft.TFSAutoNotify.TFSAutoNotify;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using Microsoft.TeamFoundation.VersionControl.Client;
using Wicresoft.TFSAutoNotify.Common;
using System.Collections.Generic;

namespace TestProject
{
    
    
    /// <summary>
    ///This is a test class for AutoNotifyTest and is intended
    ///to contain all AutoNotifyTest Unit Tests
    ///</summary>
    [TestClass()]
    public class AutoNotifyTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for AutoNotify Constructor
        ///</summary>
        [TestMethod()]
        public void AutoNotifyConstructorTest()
        {
            AutoNotify target = new AutoNotify();
            Assert.Inconclusive("TODO: Implement code to verify target");
        }

        /// <summary>
        ///A test for CreateShelveInfo
        ///</summary>
        [TestMethod()]
        public void CreateShelveInfoTest()
        {
            Shelveset s = null; // TODO: Initialize to an appropriate value
            ShelveInfo expected = null; // TODO: Initialize to an appropriate value
            ShelveInfo actual;
            actual = AutoNotify.CreateShelveInfo(s);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for DeleteShelveSetIfMoreThan
        ///</summary>
        [TestMethod()]
        public void DeleteShelveSetIfMoreThanTest()
        {
            Shelveset[] sets = null; // TODO: Initialize to an appropriate value
            VersionControlServer server = null; // TODO: Initialize to an appropriate value
            int timeDay = 0; // TODO: Initialize to an appropriate value
            AutoNotify.DeleteShelveSetIfMoreThan(sets, server, timeDay);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for IsExist
        ///</summary>
        [TestMethod()]
        public void IsExistTest()
        {
            string info = string.Empty; // TODO: Initialize to an appropriate value
            string owner = string.Empty; // TODO: Initialize to an appropriate value
            DateTime createTime = new DateTime(); // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = AutoNotify.IsExist(info, owner, createTime);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for IsExist
        ///</summary>
        [TestMethod()]
        public void IsExistTest1()
        {
            string _info = string.Empty; // TODO: Initialize to an appropriate value
            List<ShelveInfo> _list = null; // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = AutoNotify.IsExist(_info, _list);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for IsWho
        ///</summary>
        [TestMethod()]
        public void IsWhoTest()
        {
            EmployeesInfo p = null; // TODO: Initialize to an appropriate value
            string codeReviewers = string.Empty; // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = AutoNotify.IsWho(p, codeReviewers);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Notify
        ///</summary>
        [TestMethod()]
        public void NotifyTest()
        {
            AutoNotify.Notify();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for SaveShelveSet
        ///</summary>
        [TestMethod()]
        public void SaveShelveSetTest()
        {
            Shelveset[] sets = null; // TODO: Initialize to an appropriate value
            AutoNotify.SaveShelveSet(sets);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for queryMailTo
        ///</summary>
        [TestMethod()]
        public void queryMailToTest()
        {
            string codeReviewer ="王吉彬"; // TODO: Initialize to an appropriate value
            string expected = "i-jibw@wicresoft.com"; // TODO: Initialize to an appropriate value
            string actual;
            actual = AutoNotify.QueryMailTo(codeReviewer);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
    }
}
